﻿using System;
using System.Runtime.CompilerServices;
using Microsoft.Scripting.Runtime;
using Microsoft.Scripting;

namespace Cjc.Calculation.ExpressionEngine.Excel.Runtime.Operations
{
	public static class NoneTypeOps
	{
		[ImplicitConversionMethod]
		public static Int32 ConvertToInt32( DynamicNull x ) { return 0; }
		[ImplicitConversionMethod]
		public static Int64 ConvertToInt64( DynamicNull x ) { return 0; }
		[ImplicitConversionMethod]
		public static double ConvertToDouble( DynamicNull x ) { return 0; }
		[ImplicitConversionMethod]
		public static decimal ConvertToDecimal( DynamicNull x ) { return 0; }
		[ImplicitConversionMethod]
		public static bool ConvertToBoolean( DynamicNull x ) { return false; }

		[SpecialName]
		public static object Add( DynamicNull x, DynamicNull y ) { return null; }
		[SpecialName]
		public static object Subtract( DynamicNull x, DynamicNull y ) { return null; }
		[SpecialName]
		public static object Multiply( DynamicNull x, DynamicNull y ) { return null; }
		[SpecialName]
		public static object Divide( DynamicNull x, DynamicNull y ) { return null; }
	}
}